package homeWork.Object_Pra;

public class Car extends Vehicle{
        int loader;
        Car(){
            loader = 0;
            speed = 0;
        }
        Car(String color,String brand,double speed,int loader){
            this.loader = loader;
            this.brand = brand;
            this.color = color;
            this.speed = speed;
        }

        public static void main(String[] args) {
            Car c = new Car();
            c.color = "red";
            c.brand = "Honda";
            c.loader = 2;
            System.out.println("轿车品牌为"+c.brand+"颜色为"+c.color+"载人数为"+c.loader);
        }
}

